From: Jim Blandy Date: Tue, 23 Mar 1993 07:41:49 +0000 (+0000) Subject: * files.el (insert-directory): Do chase symlinks before passing X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96725 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=632c2579f7522e8e760ef1342a01fa52d018f8ef;p=emacs.git * files.el (insert-directory): Do chase symlinks before passing the directory name to ls. --- diff --git a/lisp/files.el b/lisp/files.el index f27ceff0506..dc2d39319ec 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1689,10 +1689,13 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'." "-c" (concat insert-directory-program " -d " switches " " (file-name-nondirectory file)))) -;;; ;; Chase links till we reach a non-link. -;;; (let (symlink) -;;; (while (setq symlink (file-symlink-p file)) -;;; (setq file symlink))) + ;; Chase links till we reach a non-link. + ;; This used to be commented out, but Barry Margolin says: + ;; SunOS 4.1.3 (and SV and POSIX?) lists the link + ;; if we give a link to a directory - yuck! + (let (symlink) + (while (setq symlink (file-symlink-p file)) + (setq file symlink))) (call-process insert-directory-program nil t nil switches file)))))) (defun save-buffers-kill-emacs (&optional arg)